package com.objectproject.main.dao.mybatis.mapper.hierarchy;

import java.util.ArrayList;

import org.apache.ibatis.annotations.Param;

import com.objectproject.main.model.MyGroup;

public interface MyGroupHierarchyMapper {
	public abstract ArrayList<Long> selectSuperGroupIds(long groupId);
	public abstract ArrayList<Long> selectSubGroupIds(long groupId);
	public abstract ArrayList<MyGroup> selectSuperGroups(long groupId);
	public abstract ArrayList<MyGroup> selectSubGroups(long groupId);
	public abstract void insertHierarchy(@Param("groupId")long groupId, @Param("superGroupId")long superGroupId);
	public abstract void deleteHierarchy(@Param("groupId")long groupId, @Param("superGroupId")long superGroupId);

	//advanced
	public abstract ArrayList<Long> selectAncestorGroupIds(long groupId);
	public abstract ArrayList<Long> selectDescendantGroupIds(long groupId);
	public abstract ArrayList<Long> selectLeafGroupIds(long groupId);


	public abstract ArrayList<MyGroup> selectAncestorGroups(long groupId);
	public abstract ArrayList<MyGroup> selectDescendantGroups(long groupId);
	public abstract ArrayList<MyGroup> selectLeafGroups(long groupId);

}
